Integrand size = 21, antiderivative size = 169 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=a^3 x+\frac {19 a^3 \text {arctanh}(\sin (c+d x))}{16 d}-\frac {a^3 \tan (c+d x)}{d}-\frac {17 a^3 \sec (c+d x) \tan (c+d x)}{16 d}-\frac {a^3 \sec ^3(c+d x) \tan (c+d x)}{8 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a^3 \sec ^3(c+d x) \tan ^3(c+d x)}{6 d}+\frac {3 a^3 \tan ^5(c+d x)}{5 d} \]
a^3*x+19/16*a^3*arctanh(sin(d*x+c))/d-a^3*tan(d*x+c)/d-17/16*a^3*sec(d*x+c )*tan(d*x+c)/d-1/8*a^3*sec(d*x+c)^3*tan(d*x+c)/d+1/3*a^3*tan(d*x+c)^3/d+3/ 4*a^3*sec(d*x+c)*tan(d*x+c)^3/d+1/6*a^3*sec(d*x+c)^3*tan(d*x+c)^3/d+3/5*a^ 3*tan(d*x+c)^5/d
Time = 0.46 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.18 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {a^3 \arctan (\tan (c+d x))}{d}+\frac {19 a^3 \text {arctanh}(\sin (c+d x))}{16 d}-\frac {a^3 \tan (c+d x)}{d}+\frac {19 a^3 \sec (c+d x) \tan (c+d x)}{16 d}-\frac {53 a^3 \sec ^3(c+d x) \tan (c+d x)}{24 d}-\frac {a^3 \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \sec (c+d x) \tan ^3(c+d x)}{d}+\frac {a^3 \sec ^3(c+d x) \tan ^3(c+d x)}{3 d}+\frac {3 a^3 \tan ^5(c+d x)}{5 d} \]
(a^3*ArcTan[Tan[c + d*x]])/d + (19*a^3*ArcTanh[Sin[c + d*x]])/(16*d) - (a^ 3*Tan[c + d*x])/d + (19*a^3*Sec[c + d*x]*Tan[c + d*x])/(16*d) - (53*a^3*Se c[c + d*x]^3*Tan[c + d*x])/(24*d) - (a^3*Sec[c + d*x]^5*Tan[c + d*x])/(6*d ) + (a^3*Tan[c + d*x]^3)/(3*d) + (3*a^3*Sec[c + d*x]*Tan[c + d*x]^3)/d + ( a^3*Sec[c + d*x]^3*Tan[c + d*x]^3)/(3*d) + (3*a^3*Tan[c + d*x]^5)/(5*d)
Time = 0.45 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 4374, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^4(c+d x) (a \sec (c+d x)+a)^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cot \left (c+d x+\frac {\pi }{2}\right )^4 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3dx\) |
\(\Big \downarrow \) 4374 |
\(\displaystyle \int \left (a^3 \tan ^4(c+d x)+a^3 \tan ^4(c+d x) \sec ^3(c+d x)+3 a^3 \tan ^4(c+d x) \sec ^2(c+d x)+3 a^3 \tan ^4(c+d x) \sec (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {19 a^3 \text {arctanh}(\sin (c+d x))}{16 d}+\frac {3 a^3 \tan ^5(c+d x)}{5 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}-\frac {a^3 \tan (c+d x)}{d}+\frac {a^3 \tan ^3(c+d x) \sec ^3(c+d x)}{6 d}-\frac {a^3 \tan (c+d x) \sec ^3(c+d x)}{8 d}+\frac {3 a^3 \tan ^3(c+d x) \sec (c+d x)}{4 d}-\frac {17 a^3 \tan (c+d x) \sec (c+d x)}{16 d}+a^3 x\) |
a^3*x + (19*a^3*ArcTanh[Sin[c + d*x]])/(16*d) - (a^3*Tan[c + d*x])/d - (17 *a^3*Sec[c + d*x]*Tan[c + d*x])/(16*d) - (a^3*Sec[c + d*x]^3*Tan[c + d*x]) /(8*d) + (a^3*Tan[c + d*x]^3)/(3*d) + (3*a^3*Sec[c + d*x]*Tan[c + d*x]^3)/ (4*d) + (a^3*Sec[c + d*x]^3*Tan[c + d*x]^3)/(6*d) + (3*a^3*Tan[c + d*x]^5) /(5*d)
3.1.48.3.1 Defintions of rubi rules used
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_))^(n_), x_Symbol] :> Int[ExpandIntegrand[(e*Cot[c + d*x])^m, (a + b*Csc[ c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[n, 0]
Result contains complex when optimal does not.
Time = 2.26 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.15
method | result | size |
risch | \(a^{3} x +\frac {i a^{3} \left (435 \,{\mathrm e}^{11 i \left (d x +c \right )}+240 \,{\mathrm e}^{10 i \left (d x +c \right )}+865 \,{\mathrm e}^{9 i \left (d x +c \right )}-1200 \,{\mathrm e}^{8 i \left (d x +c \right )}-210 \,{\mathrm e}^{7 i \left (d x +c \right )}-1760 \,{\mathrm e}^{6 i \left (d x +c \right )}+210 \,{\mathrm e}^{5 i \left (d x +c \right )}-1440 \,{\mathrm e}^{4 i \left (d x +c \right )}-865 \,{\mathrm e}^{3 i \left (d x +c \right )}-1296 \,{\mathrm e}^{2 i \left (d x +c \right )}-435 \,{\mathrm e}^{i \left (d x +c \right )}-176\right )}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}+\frac {19 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{16 d}-\frac {19 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{16 d}\) | \(194\) |
derivativedivides | \(\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{5}}{24 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{48 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{48}-\frac {\sin \left (d x +c \right )}{16}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+\frac {3 a^{3} \sin \left (d x +c \right )^{5}}{5 \cos \left (d x +c \right )^{5}}+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a^{3} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )}{d}\) | \(223\) |
default | \(\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{5}}{24 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{48 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{48}-\frac {\sin \left (d x +c \right )}{16}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+\frac {3 a^{3} \sin \left (d x +c \right )^{5}}{5 \cos \left (d x +c \right )^{5}}+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a^{3} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )}{d}\) | \(223\) |
parts | \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{5}}{24 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{48 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{48}-\frac {\sin \left (d x +c \right )}{16}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}+\frac {3 a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}+\frac {3 a^{3} \tan \left (d x +c \right )^{5}}{5 d}\) | \(226\) |
a^3*x+1/120*I*a^3*(435*exp(11*I*(d*x+c))+240*exp(10*I*(d*x+c))+865*exp(9*I *(d*x+c))-1200*exp(8*I*(d*x+c))-210*exp(7*I*(d*x+c))-1760*exp(6*I*(d*x+c)) +210*exp(5*I*(d*x+c))-1440*exp(4*I*(d*x+c))-865*exp(3*I*(d*x+c))-1296*exp( 2*I*(d*x+c))-435*exp(I*(d*x+c))-176)/d/(exp(2*I*(d*x+c))+1)^6+19/16*a^3/d* ln(exp(I*(d*x+c))+I)-19/16*a^3/d*ln(exp(I*(d*x+c))-I)
Time = 0.28 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.90 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {480 \, a^{3} d x \cos \left (d x + c\right )^{6} + 285 \, a^{3} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 285 \, a^{3} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (176 \, a^{3} \cos \left (d x + c\right )^{5} + 435 \, a^{3} \cos \left (d x + c\right )^{4} + 208 \, a^{3} \cos \left (d x + c\right )^{3} - 110 \, a^{3} \cos \left (d x + c\right )^{2} - 144 \, a^{3} \cos \left (d x + c\right ) - 40 \, a^{3}\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \]
1/480*(480*a^3*d*x*cos(d*x + c)^6 + 285*a^3*cos(d*x + c)^6*log(sin(d*x + c ) + 1) - 285*a^3*cos(d*x + c)^6*log(-sin(d*x + c) + 1) - 2*(176*a^3*cos(d* x + c)^5 + 435*a^3*cos(d*x + c)^4 + 208*a^3*cos(d*x + c)^3 - 110*a^3*cos(d *x + c)^2 - 144*a^3*cos(d*x + c) - 40*a^3)*sin(d*x + c))/(d*cos(d*x + c)^6 )
\[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=a^{3} \left (\int 3 \tan ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 \tan ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \tan ^{4}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \tan ^{4}{\left (c + d x \right )}\, dx\right ) \]
a**3*(Integral(3*tan(c + d*x)**4*sec(c + d*x), x) + Integral(3*tan(c + d*x )**4*sec(c + d*x)**2, x) + Integral(tan(c + d*x)**4*sec(c + d*x)**3, x) + Integral(tan(c + d*x)**4, x))
Time = 0.31 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.24 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {288 \, a^{3} \tan \left (d x + c\right )^{5} + 160 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{3} - 5 \, a^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{5} + 8 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 90 \, a^{3} {\left (\frac {2 \, {\left (5 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} + 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{480 \, d} \]
1/480*(288*a^3*tan(d*x + c)^5 + 160*(tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan( d*x + c))*a^3 - 5*a^3*(2*(3*sin(d*x + c)^5 + 8*sin(d*x + c)^3 - 3*sin(d*x + c))/(sin(d*x + c)^6 - 3*sin(d*x + c)^4 + 3*sin(d*x + c)^2 - 1) - 3*log(s in(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) + 90*a^3*(2*(5*sin(d*x + c)^3 - 3*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) + 3*log(sin(d*x + c) + 1) - 3*log(sin(d*x + c) - 1)))/d
Time = 1.28 (sec) , antiderivative size = 164, normalized size of antiderivative = 0.97 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {240 \, {\left (d x + c\right )} a^{3} + 285 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 285 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (45 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 95 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 366 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 1746 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3135 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 525 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6}}}{240 \, d} \]
1/240*(240*(d*x + c)*a^3 + 285*a^3*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 28 5*a^3*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(45*a^3*tan(1/2*d*x + 1/2*c)^ 11 - 95*a^3*tan(1/2*d*x + 1/2*c)^9 - 366*a^3*tan(1/2*d*x + 1/2*c)^7 + 1746 *a^3*tan(1/2*d*x + 1/2*c)^5 - 3135*a^3*tan(1/2*d*x + 1/2*c)^3 + 525*a^3*ta n(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^6)/d
Time = 14.83 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.20 \[ \int (a+a \sec (c+d x))^3 \tan ^4(c+d x) \, dx=a^3\,x+\frac {19\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}+\frac {-\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{8}+\frac {19\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}+\frac {61\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{20}-\frac {291\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{20}+\frac {209\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{8}-\frac {35\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
a^3*x + (19*a^3*atanh(tan(c/2 + (d*x)/2)))/(8*d) + ((209*a^3*tan(c/2 + (d* x)/2)^3)/8 - (291*a^3*tan(c/2 + (d*x)/2)^5)/20 + (61*a^3*tan(c/2 + (d*x)/2 )^7)/20 + (19*a^3*tan(c/2 + (d*x)/2)^9)/24 - (3*a^3*tan(c/2 + (d*x)/2)^11) /8 - (35*a^3*tan(c/2 + (d*x)/2))/8)/(d*(15*tan(c/2 + (d*x)/2)^4 - 6*tan(c/ 2 + (d*x)/2)^2 - 20*tan(c/2 + (d*x)/2)^6 + 15*tan(c/2 + (d*x)/2)^8 - 6*tan (c/2 + (d*x)/2)^10 + tan(c/2 + (d*x)/2)^12 + 1))